package com.hiultra.archive.service.impl;

import java.util.List;
import com.hiultra.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hiultra.archive.mapper.ArcCheckDetailsMapper;
import com.hiultra.archive.domain.ArcCheckDetails;
import com.hiultra.archive.service.IArcCheckDetailsService;

/**
 * 资产盘点子Service业务层处理
 * 
 * @author ls
 * @date 2023-09-05
 */
@Service
public class ArcCheckDetailsServiceImpl implements IArcCheckDetailsService 
{
    @Autowired
    private ArcCheckDetailsMapper arcCheckDetailsMapper;

    /**
     * 查询资产盘点子
     * 
     * @param detailId 资产盘点子主键
     * @return 资产盘点子
     */
    @Override
    public ArcCheckDetails selectArcCheckDetailsByDetailId(Long detailId)
    {
        return arcCheckDetailsMapper.selectArcCheckDetailsByDetailId(detailId);
    }

    /**
     * 查询资产盘点子列表
     * 
     * @param arcCheckDetails 资产盘点子
     * @return 资产盘点子
     */
    @Override
    public List<ArcCheckDetails> selectArcCheckDetailsList(ArcCheckDetails arcCheckDetails)
    {
        return arcCheckDetailsMapper.selectArcCheckDetailsList(arcCheckDetails);
    }

    /**
     * 新增资产盘点子
     * 
     * @param arcCheckDetails 资产盘点子
     * @return 结果
     */
    @Override
    public int insertArcCheckDetails(ArcCheckDetails arcCheckDetails)
    {
        arcCheckDetails.setCreateTime(DateUtils.getNowDate());
        return arcCheckDetailsMapper.insertArcCheckDetails(arcCheckDetails);
    }

    /**
     * 修改资产盘点子
     * 
     * @param arcCheckDetails 资产盘点子
     * @return 结果
     */
    @Override
    public int updateArcCheckDetails(ArcCheckDetails arcCheckDetails)
    {
        arcCheckDetails.setUpdateTime(DateUtils.getNowDate());
        return arcCheckDetailsMapper.updateArcCheckDetails(arcCheckDetails);
    }

    /**
     * 批量删除资产盘点子
     * 
     * @param detailIds 需要删除的资产盘点子主键
     * @return 结果
     */
    @Override
    public int deleteArcCheckDetailsByDetailIds(Long[] detailIds)
    {
        return arcCheckDetailsMapper.deleteArcCheckDetailsByDetailIds(detailIds);
    }

    /**
     * 删除资产盘点子信息
     * 
     * @param detailId 资产盘点子主键
     * @return 结果
     */
    @Override
    public int deleteArcCheckDetailsByDetailId(Long detailId)
    {
        return arcCheckDetailsMapper.deleteArcCheckDetailsByDetailId(detailId);
    }
}
